home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / CPlusPlus / LinkSpcB.xh < prev    next >
Encoding:
Text File  |  1994-04-19  |  3.4 KB  |  158 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Locrian:WWDCSun:CPlusPlus:LinkSpcB.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: somc/smemit.c
  7.  *     SOM Emitter emitxh.dll: somc/smmain.c
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Theory of Operation
  13.  * 
  14.  * 
  15.  *  Classes defined in this interface
  16.  * 
  17.  */
  18.  
  19.  
  20. #ifndef SOM_ODBaseLinkSpec_xh
  21. #define SOM_ODBaseLinkSpec_xh
  22.  
  23. class ODBaseLinkSpec;
  24.  
  25. #define ODBaseLinkSpec_MajorVersion 1
  26. #define ODBaseLinkSpec_MinorVersion 0
  27.  
  28. /* C++ som defs */
  29. #include <somcls.xh>
  30.  
  31. /* Include C++ parent defs */
  32. #ifndef SOM_ODObject_xh
  33. #include <ODObject.xh>
  34. #endif
  35.  
  36. #ifndef ODBaseLinkSpec_API
  37. #define ODBaseLinkSpec_API
  38. /*
  39.  * -- The Class API
  40.  */
  41.  
  42. /*
  43.  * Start of user-defined types:
  44.  */
  45. class ODExtension;
  46. class ODStorageUnit;
  47. class ODPart;
  48. class ODDraft;
  49.  
  50. /*
  51.  * End of user-defined types.
  52.  */
  53.  
  54. #if applec ^ PRAGMA_LIB_EXPORT
  55. #pragma lib_export on
  56. #endif
  57.  
  58.  
  59. /* A procedure to create the ODBaseLinkSpec Class */
  60. SOMEXTERN SOMClass * SOMLINK ODBaseLinkSpecNewClass(
  61.         integer4 majorVersion,
  62.         integer4 minorVersion);
  63.  
  64. /* The API to the ODBaseLinkSpec class object, and the methods it introduces. */
  65. typedef struct ODBaseLinkSpecClassDataStructure {
  66.     SOMClass *classObject;
  67.     somMToken WriteLinkSpec;
  68.     somMToken ReadLinkSpec;
  69.     somMToken reserved1;
  70. } ODBaseLinkSpecClassDataStructure;
  71. #ifdef SOM_NO_DATA_EXPORTS
  72.    SOMEXTERN ODBaseLinkSpecClassDataStructure * ODBaseLinkSpecGetClassData ( void );
  73. #   undef ODBaseLinkSpecClassData
  74. #   define ODBaseLinkSpecClassData (*ODBaseLinkSpecGetClassData())
  75. #else
  76.    SOMEXTERN ODBaseLinkSpecClassDataStructure ODBaseLinkSpecClassData;
  77. #endif /* SOM_NO_DATA_EXPORTS */
  78.  
  79. #if applec ^ PRAGMA_LIB_EXPORT
  80. #pragma lib_export off
  81. #endif
  82.  
  83. #define _ODBaseLinkSpec ODBaseLinkSpecClassData.classObject
  84.  
  85. /* The API to parentMtabs for ODBaseLinkSpec, and the instance data it introduces. */
  86. SOMEXTERN struct ODBaseLinkSpecCClassDataStructure {
  87.     somMethodTabs parentMtab;
  88.     somDToken instanceDataToken;
  89. } ODBaseLinkSpecCClassData;
  90.  
  91. /*
  92.  * -- Typedefs for Procedures that support Methods introduced by ODBaseLinkSpec
  93.  */
  94. SOMEXTERN {
  95. typedef void   (* SOMLINK somTD_ODBaseLinkSpec_WriteLinkSpec)(ODBaseLinkSpec *somSelf, Environment *ev,
  96.         ODStorageUnit* su);
  97. typedef void   (* SOMLINK somTD_ODBaseLinkSpec_ReadLinkSpec)(ODBaseLinkSpec *somSelf, Environment *ev,
  98.         ODStorageUnit* su);
  99. }
  100.  
  101. #endif /* ODBaseLinkSpec_API */
  102.  
  103.  
  104. /*
  105.  * -- Method Tokens are Thunks
  106.  */
  107. #undef somresolve_
  108. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  109.  
  110. /*
  111.  * -- The C++ Wrapper Class for ODBaseLinkSpec
  112.  */
  113. class ODBaseLinkSpec : public ODObject
  114. {
  115. public:
  116.  
  117. void *operator new(size_t size)
  118. {
  119.    SOM_IgnoreWarning(size);
  120.    if (!ODBaseLinkSpecClassData.classObject) 
  121.       ODBaseLinkSpecNewClass(ODBaseLinkSpec_MajorVersion,ODBaseLinkSpec_MinorVersion);
  122.    return (void *)
  123.       ((somTD_SOMClass_somNew)
  124.       somresolve_((SOMObject *)((void*)(ODBaseLinkSpecClassData.classObject)),
  125.                  SOMClassClassData.somNew))
  126.          ((SOMClass *)((void*)(ODBaseLinkSpecClassData.classObject)));
  127. }
  128.  
  129. void operator delete(void * obj)
  130. {
  131.    ((SOMObject *)obj)->somFree();
  132. }
  133.  
  134. /* public method: WriteLinkSpec */
  135. void   WriteLinkSpec(Environment *ev,
  136.         ODStorageUnit* su)
  137. {
  138.    SOM_Resolve(this,ODBaseLinkSpec,WriteLinkSpec)
  139.     (this,ev,su);
  140. }
  141.  
  142.  
  143. /* public method: ReadLinkSpec */
  144. void   ReadLinkSpec(Environment *ev,
  145.         ODStorageUnit* su)
  146. {
  147.    SOM_Resolve(this,ODBaseLinkSpec,ReadLinkSpec)
  148.     (this,ev,su);
  149. }
  150.  
  151.  
  152.  
  153. };   /* ODBaseLinkSpec */
  154.  
  155.  
  156.  
  157. #endif       /* SOM_ODBaseLinkSpec_xh */
  158.